package com.example.binpacking.mapper;

import com.example.binpacking.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface UserMapper {
    @Select("select * from user where username = #{username}")
    User searchByUname(String uname);

    @Insert("insert into  user(uid, username,password,md_password) values (#{uid},#{username},#{password},#{md_password})")
    void insert(User user);

}
